package com.hxkj.client.service;

import com.hxkj.domain.po.SysUser;
import com.hxkj.domain.result.UserParameterDataStruct;
import com.platform.common.domain.result.ResultDataStruct;
import com.platform.common.domain.result.ResultMessageStruct;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

/**
 * created by kezhijie on 2018/8/28 10:28.
 * email to kezhijie@hxoss.com
 */
@FeignClient(name = "cms-user-center")
public interface UserInfoServiceClient extends BaseClient {

    @RequestMapping(value = "/userinfo/get", method = RequestMethod.GET, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    ResultDataStruct<SysUser> userinfoGet(@RequestParam("token") String token);

    @RequestMapping(value = "/userinfo/update", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    ResultDataStruct<SysUser> update(@RequestBody SysUser sysUser);

    @RequestMapping(value = "/userinfo/updatePhone", method = RequestMethod.POST, consumes =MediaType.APPLICATION_JSON_UTF8_VALUE)
    ResultMessageStruct userinfoUpdatePhone(@RequestBody UserParameterDataStruct<SysUser, String> userParameterDataStruct);
}
